#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import reboot
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    dr.reboot(id_num=data.id_num)
    rospy.loginfo("reboot_node")


def listener():
    rospy.init_node("reboot", anonymous=True)
    rospy.Subscriber("reboot", reboot, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

